/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package escr.persistencia;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Aditardo
 */
@Entity
@Table(name = "numcontrolpres")
@NamedQueries({@NamedQuery(name = "Numcontrolpres.findByIdnumCon", query = "SELECT n FROM Numcontrolpres n WHERE n.idnumCon = :idnumCon"), @NamedQuery(name = "Numcontrolpres.findByRefnumCon", query = "SELECT n FROM Numcontrolpres n WHERE n.refnumCon = :refnumCon"), @NamedQuery(name = "Numcontrolpres.findByRefPresupue", query = "SELECT n FROM Numcontrolpres n WHERE n.refPresupue = :refPresupue"), @NamedQuery(name = "Numcontrolpres.findByRefEstado", query = "SELECT n FROM Numcontrolpres n WHERE n.refEstado = :refEstado")})
public class Numcontrolpres implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Column(name = "id_numCon", nullable = false)
    private Integer idnumCon;
    @Column(name = "ref_numCon")
    private String refnumCon;
    @Column(name = "ref_presupue")
    private Integer refPresupue;
    @Column(name = "ref_estado")
    private Integer refEstado;

    public Numcontrolpres() {
    }

    public Numcontrolpres(Integer idnumCon) {
        this.idnumCon = idnumCon;
    }

    public Integer getIdnumCon() {
        return idnumCon;
    }

    public void setIdnumCon(Integer idnumCon) {
        this.idnumCon = idnumCon;
    }

    public String getRefnumCon() {
        return refnumCon;
    }

    public void setRefnumCon(String refnumCon) {
        this.refnumCon = refnumCon;
    }

    public Integer getRefPresupue() {
        return refPresupue;
    }

    public void setRefPresupue(Integer refPresupue) {
        this.refPresupue = refPresupue;
    }

    public Integer getRefEstado() {
        return refEstado;
    }

    public void setRefEstado(Integer refEstado) {
        this.refEstado = refEstado;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idnumCon != null ? idnumCon.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Numcontrolpres)) {
            return false;
        }
        Numcontrolpres other = (Numcontrolpres) object;
        if ((this.idnumCon == null && other.idnumCon != null) || (this.idnumCon != null && !this.idnumCon.equals(other.idnumCon))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "escr.persistencia.Numcontrolpres[idnumCon=" + idnumCon + "]";
    }

}
